<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .account {
            width: 400px;
            margin: 0 auto;
        }
    </style>
    <title>用户注册</title>
</head>

<body>
    <div class="account">
        <h1>用户注册</h1>
        <form>
            {% for field in form %}

            {% if field.name == 'code' %}
            <div class="form-group">
                <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                <div class="clearfix">
                    <div class="col-md-6" style="padding-left:0">{{ field }}</div>
                    <div class="col-md-6"><button class="btn btn-sm">发送手机验证码</button></div>
                </div>

            </div>
            {% else %}
            <div class="form-group">
                <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                <!-- <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email"> -->
                {{ field }}
            </div>
            {% endif %}
            {% endfor %}
            <button type="submit" class="btn btn-default">注册</button>
        </form>
    </div>

</body>

</html>